package com.pic.mgt.dao.haishin;

import java.sql.Timestamp;

import org.springframework.dao.DataAccessException;

import com.pic.mgt.dao.IBusinessMgtDao;

public interface IHaishinBusinessMgtDao extends IBusinessMgtDao {
	
	// table 內的欄位名稱
	public static final String _scheduleExecutionTime = "schedule_execution_time";
	public static final String _executionTime = "execution_time";
	public static final String _loadingTime = "loading_time";
	public static final String _redoAsginTerminal = "redo_asgin_terminal";
	public static final String _redoAsginTerminalFile = "redo_asgin_terminal_file";

	public int updateStatusAndExecutionTimeByUnitName(
			String statusValue,
			Timestamp executionTimeValue,
			String unitName)
					throws DataAccessException;
	
	/**
	 * 
	 * @param unitName
	 * @return [0]:redo asgin terminal  [1]:redo asgin terminal file
	 * @throws DataAccessException
	 */
	public String[] findRedoAsginTerminalAndRedoAsginTerminalFileByUnitName(String unitName) throws DataAccessException;
	
	public HaishinBusinessMgtInfoBean findHaishinBusinessMgtInfoByUnitName(String unitName) throws DataAccessException;
	
	public int updateRedoAsginTerminalByUnitName(String redoAsginTerminal, String unitName) throws DataAccessException;
	
	public int updateStatusRedoAsginTerminalFileAndRedoAsginTerminalByUnitName(
			String status, String redoAsginTerminal,
			String redoAsginTerminalFile, String unitName) throws DataAccessException;
}
